package cn.summit.exception;

/**
 * 状态码
 *
 * @author summit
 * @since 2020/7/30 16:46
 */
public interface StatusCode {

    String SUCCESS_CODE = "BIZ000000";


    String getCode();

    String getFormat();

    default boolean isSuccess(String statusCode) {
        return SUCCESS_CODE.equals(statusCode);
    }

    default boolean isFailed(String statusCode) {
        return !isSuccess(statusCode);
    }
}
